<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
</head>
<body>
	<div><h1>这是index页面</h1></div>
	<div>
		<a href="${pageContext.request.contextPath }/toMain">
			<img alt="去主页" src="${pageContext.request.contextPath }/statics/img/toMain.JPG" height="100" width="1000">
		</a>
	</div>
	<div>
		<button type="button">
			<img alt="去登录页面" src="${pageContext.request.contextPath }/statics/img/login.JPG" height="100" width="1000">
		</button>
	</div>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/jquery-3.5.1.js"></script>
<script type="text/javascript">
	$("button").click(function(){
		window.location.href="${pageContext.request.contextPath}/toMain";
	});
</script>
</html>